public class Solution2269 {
    public int divisorSubstrings(int num, int k) {
        int ans=0;
        String r=String.valueOf(num);
        for (int i=0;i<=r.length()-k;i++){
            int t = Integer.parseInt(r.substring(i, i + k));
            if (t !=0 && num% t ==0){
                ans++;
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println(new Solution2269().divisorSubstrings(240,2));
    }
}
